<template>
    <template v-for="(item, index) in asideMenus" :key="index">
        <el-sub-menu v-if="item.child && item.child.length > 0" :index="item.meta.title">
            <template #title>
                <el-icon v-if="item.icon ">
                    <component :is="item.icon"></component>
                </el-icon>
                <span>{{ item.meta.title }}</span>
            </template>
            <FMenuTree :asideMenus="item.child" />
        </el-sub-menu>
        <el-menu-item v-else :index="item.path">
            <el-icon v-if="item.icon">
                <component :is="item.icon"></component>
            </el-icon>
            <span>{{ item.meta.title }}</span>
        </el-menu-item>
    </template>
</template>

<script setup >
const props = defineProps({
    asideMenus: ""
})

</script>